<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="templates/templateRestaurateur.xhtml">
	<ui:define name="pageHeader">
	    Console RESTAURATEUR
	    <br />

	</ui:define>

	<ui:define name="body">
		<h:form>
			<div>
				<br /> <span>Liste Arrivée Des Commandes Clients </span>
				<h:outputText
					value="#{commandeMB.commande.client.prenom} #{commandeMB.commande.client.nom}" />

				<br /> <br />
			</div>
			<h:dataTable border="1" value="#{commandeMB.listeCommandes}" var="r">


				<h:column>
					<f:facet name="header">
						<f:verbatim>id commande</f:verbatim>
					</f:facet>
					<h:outputText value="#{r.id}" />
				</h:column>

				<h:column>
					<f:facet name="header">
						<f:verbatim>date commande</f:verbatim>
					</f:facet>
					<h:outputText value="#{r.dateCommandeCalendar.time}">
						<f:convertDateTime pattern="dd/MM/yyyy" />
					</h:outputText>
				</h:column>
				<h:column>
					<f:facet name="header">
						<f:verbatim>etat commande</f:verbatim>
					</f:facet>
					<h:outputText value="#{r.etatCommande}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<f:verbatim>total commande</f:verbatim>
					</f:facet>
					<h:outputText value="#{r.totalCommande}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<f:verbatim>status commande</f:verbatim>
					</f:facet>
					<h:commandButton value="préparation"
						action="#{commandeMB.doPreparation}"
						style="width: 100px; height: 25px" />
					<br />
					<h:commandButton value="livrée" action="#{commandeMB.doLivraison}"
						style="width: 100px; height: 25px" />

				</h:column>
			</h:dataTable>
			<br />




		</h:form>
	</ui:define>
</ui:composition>
</html>